/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.ts.manager.impl;

import java.util.Collection;
import java.util.List;

import com.xy.biz.ts.dao.ExaminationQuestionOptionDao;
import com.xy.biz.ts.domain.bo.ExaminationQuestionOptionBO;
import com.xy.biz.ts.domain.converter.ExaminationQuestionOptionConverter;
import com.xy.biz.ts.domain.query.ExaminationQuestionOptionQuery;
import com.xy.biz.ts.manager.ExaminationQuestionOptionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 *
 * @author wwj
 * @date 2021-3-18
 */
@Service
public class ExaminationQuestionOptionManagerImpl implements ExaminationQuestionOptionManager {

	@Autowired
	private ExaminationQuestionOptionDao examinationQuestionOptionDao;

	@Override
	public int saveExaminationQuestionOption(ExaminationQuestionOptionBO examinationQuestionOptionBO) {
		return examinationQuestionOptionDao.saveExaminationQuestionOption(ExaminationQuestionOptionConverter.toPO(examinationQuestionOptionBO));
	}

	@Override
	public int saveAllExaminationQuestionOption(Collection<ExaminationQuestionOptionBO> collection) {
		return examinationQuestionOptionDao.saveAllExaminationQuestionOption(ExaminationQuestionOptionConverter.toPO(collection));
	}

	@Override
	public int updateExaminationQuestionOption(ExaminationQuestionOptionBO examinationQuestionOptionBO) {
		return examinationQuestionOptionDao.updateExaminationQuestionOption(ExaminationQuestionOptionConverter.toPO(examinationQuestionOptionBO));
	}

	@Override
	public int deleteExaminationQuestionOption(Long examinationQuestionOptionId) {
		return examinationQuestionOptionDao.deleteExaminationQuestionOption(examinationQuestionOptionId);
	}

	@Override
	public int deleteExaminationQuestionOptionByExaminationQuestionId(Long examinationQuestionId) {
		return examinationQuestionOptionDao.deleteExaminationQuestionOptionByExaminationQuestionId(examinationQuestionId);
	}

	@Override
	public ExaminationQuestionOptionBO getExaminationQuestionOption(Long examinationQuestionOptionId) {
		return ExaminationQuestionOptionConverter.fromPO(examinationQuestionOptionDao.getExaminationQuestionOption(examinationQuestionOptionId));
	}

	@Override
	public List<ExaminationQuestionOptionBO> listExaminationQuestionOptionById(Collection<Long> collection) {
		return ExaminationQuestionOptionConverter.fromPO(examinationQuestionOptionDao.listExaminationQuestionOptionById(collection));
	}

	@Override
	public List<ExaminationQuestionOptionBO> listExaminationQuestionOption(ExaminationQuestionOptionQuery query) {
		return ExaminationQuestionOptionConverter.fromPO(examinationQuestionOptionDao.listExaminationQuestionOption(query));
	}

	@Override
	public List<ExaminationQuestionOptionBO> listExaminationQuestionOption(Collection<Long> examinationQuestionIds) {
		return ExaminationQuestionOptionConverter.fromPO(examinationQuestionOptionDao.listExaminationQuestionOptionByExaminationQuestionIds(examinationQuestionIds));
	}

	@Override
	public int countExaminationQuestionOption(ExaminationQuestionOptionQuery query) {
		return examinationQuestionOptionDao.countExaminationQuestionOption(query);
	}

	@Override
	public int deleteExaminationQuestionOptionByIds(List<Long> examinationQuestionOptionIds) {
		return examinationQuestionOptionDao.deleteExaminationQuestionOptionByIds(examinationQuestionOptionIds);
	}

}
